package io.sdl.common.sys.entity;

import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;

import java.io.Serializable;
import java.util.Date;
import lombok.Data;

/**
 * 会话聊天消息表
 * 
 * @author Dchen
 * @email 1211734836@qq.com
 * @date 2025-05-13 14:31:02
 */
@Data
@TableName("sdl_session_message")
public class SdlSessionMessageEntity implements Serializable {
	private static final long serialVersionUID = 1L;

	/**
	 * 
	 */
	@TableId
	private Long messageId;
	/**
	 * 会话id
	 */
	private Long sessionId;
	/**
	 * 发送者id
	 */
	private Long senderId;
	/**
	 * 接收者id
	 */
	private Long receiverId;
	/**
	 * 发送内容
	 */
	private String content;
	/**
	 * 消息类型：text/image/voice/video/location...
	 */
	private String messageType;
	/**
	 * 发送时间
	 */
	private Date sendTime;
	/**
	 * 发送状态: 0-发送中 1-已发送 2-已送达 3-已读
	 */
	private Integer status;
	/**
	 * 扩展字段(如图片URL等)
	 */
	private String extras;

	//消息类型枚举类
	public enum MessageType {
		TEXT, IMAGE, VOICE, VIDEO, FILE, LOCATION
	}

	//发送状态枚举类
	public enum MessageStatus {
		SENDING, SENT, DELIVERED, READ
	}
}
